import cv2
import numpy as np

img = cv2.imread("../asset/cube.jpeg")
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
dst = cv2.goodFeaturesToTrack(gray, 1000, 0.01, 10)
print(dst)
dst = np.int0(dst)
print(dst)
for i in dst:
    print(i)
    x, y = i.ravel()
    cv2.circle(img, (x, y), 3, (0, 0, 255), -1)

while True:
    cv2.imshow('img', img)
    key = cv2.waitKey(10)
    if key & 0xFF == ord('q'):
        break
cv2.destroyAllWindows()